<template>
  <div id="app">
    <header><ul>
      <!-- <li><a href="
      /">主页</a></li>
      <li><a href="
      /document">文档</a></li>
      <li><a href="
      /about">关于</a></li> -->
      <!-- /router-link默认是a标签
      <router-link></router-link>
      <router-link to="/">主页</router-link>
        <router-link to="/document">文档</router-link>
          <router-link to="/about">关于</router-link> -->
          <!-- 可以再router-link外套一个其他的标签
           -->
          <!-- <li>  
             <router-link to="/">主页</router-link>
          </li>

          <li>   
             <router-link to="/document">文档</router-link>
             </li>
          <li>    
             <router-link to="/about">关于</router-link>
             </li> -->
        <!-- 使用router-link，不管是hash模式还是history模式都可以正常工作 -->
         <!-- <router-link to="/" tag="li" active-class="a">主页</router-link>
        <router-link to="/document" tag="li" active-class="b">文档</router-link>
          <router-link to="/about" tag="li" active-class="c">关于</router-link>   -->
               <router-link :to="index" tag="li" active-class="a">
                <i class="iconfont icon-01f"></i> <span>主页</span>
                 </router-link>
        <router-link :to="{path:'/document'}" tag="li" active-class="b">
        <i class="iconfont icon-wendang"></i> <span>文档</span></router-link>
          <router-link to="/about" tag="li" active-class="c">
          <i class="iconfont icon-guanyu"></i> <span>关于</span></router-link>  
     
    </ul></header>
 <router-view></router-view>
  </div>
</template>
 
<script>
export default {
  name: "App",
  components: {},
  data(){
    return {
      index: "./"
    };
  }
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  /* margin-top: 60px; */
}
html body {
  padding: 0;
  margin: 0;
}
header {
  background-color: red;
}
ul {
  padding: 0;
  margin: 0;
  list-style: none;
  overflow: hidden;
  height: 80px;
  padding-left: 20px;
}
li {
  float: left;
  width: 80px;
  margin-right: 25px;
  line-height: 80px;
  cursor: pointer;
}
a {
  color: black;
  text-decoration: none;
}
.router-link-exact-active {
  background-color: yellow;
}
.b {
  background-color: rgb(255, 0, 43);
}
.c {
  background-color: rgb(24, 21, 21);
}
</style>
